import csv

# file = open('example.csv')
# reader = csv.reader(file)
# # list = list(reader)
# # print(list[1][1])
# for row in reader:
#     print('row #' + str(reader.line_num) + ' ' + str(row))

# outfile = open('output.csv', 'w', newline='')
# writer = csv.writer(outfile)
# writer.writerow(['spam','eggs','bacon','ham'])
# writer.writerow(['hello,world','eggs','bacon','ham'])
# writer.writerow([1,2,3.14,4])
# outfile.close()

newfile = open('exam1.csv', 'w', newline='')
csvWriter = csv.writer(newfile, delimiter='\t', lineterminator='\n\n')
csvWriter.writerow(['apples', 'organges', 'grapes'])
csvWriter.writerow(['eggs', 'bacon', 'ham'])
csvWriter.writerow(['spam', 'spam', 'spam', 'spam'])
newfile.close()
